package com.kingdee.eas.custom.bpmworkflow.base;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import java.lang.String;



public abstract class AbstractProcInstHelpFacadeControllerBean extends AbstractBizControllerBean implements ProcInstHelpFacadeController
{
    protected AbstractProcInstHelpFacadeControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("F16EB32C");
    }

    public String updateAndApproveFlow(Context ctx, String procInstID, String userNum, String jobid, String billId, String BTID) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("fd48dbb7-5753-48e4-a61a-a32ce8c8212f"), new Object[]{ctx, procInstID, userNum, jobid, billId, BTID});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)_updateAndApproveFlow(ctx, procInstID, userNum, jobid, billId, BTID);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String _updateAndApproveFlow(Context ctx, String procInstID, String userNum, String jobid, String billId, String BTID) throws BOSException
    {    	
        return null;
    }

    public boolean isbpmworkflow(Context ctx, String procInstID, String userNum, String billId) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("4993bc97-fbda-4af2-922a-79bf354bd393"), new Object[]{ctx, procInstID, userNum, billId});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            boolean retValue = (boolean)_isbpmworkflow(ctx, procInstID, userNum, billId);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            }
            invokeServiceAfter(svcCtx);
            return ((Boolean)svcCtx.getMethodReturnValue()).booleanValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected boolean _isbpmworkflow(Context ctx, String procInstID, String userNum, String billId) throws BOSException
    {    	
        return false;
    }

}